<!DOCTYPE html>
<!-- saved from url=(0074)https://weixindl.68ecshop.com/mobile/user.php?act=order_detail&order_id=653 -->
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="Generator" content="ECSHOP v2.7.3">

    <meta name="viewport" content="width=device-width">
    <title>订单详情 </title>  <link rel="icon" href="/template/pc1/images/wmh_favicon.ico" type="image/x-icon" />
    <meta name="Keywords" content="">
    <meta name="Description" content="">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" type="text/css" href="/template/default/css/public.css">
    <link rel="stylesheet" type="text/css" href="/template/default/css/user.css">
    <link type="text/css" rel="stylesheet" href="/template/default/mobile/style/style.css">
    <link type="text/css" rel="stylesheet" href="/template/default/mobile/style/bootstrap.css">
    <link rel="stylesheet" href="/template/default/css/flow.css">
    <script type="text/javascript" src="https://static.9hive.cn/global/vendor/jquery/jquery-2.1.4.min.js"></script>
    <script type="text/javascript" src="/template/default/js/transport.js"></script>
    <script type="text/javascript" src="/template/default/js/common.js"></script>
    <script type="text/javascript" src="/template/default/js/utils.js"></script>
    <!--弹窗样式-->
    <script type="text/javascript" src="/template/default/plugins/layer/layer.js"></script>
    <style>
        .bottom-bar {
            position: fixed;
            left: 0;
            right: 0;
            bottom: 0;
        }

        .order-buy .c-order-btn {
            display: block;
            margin: 0 auto;
        }
    </style>

    <script language='javascript'>
        function tip(msg, autoClose) {
            var div = $("#poptip");
            var content = $("#poptip_content");
            if (div.length <= 0) {
                div = $("<div id='poptip'></div>").appendTo(document.body);
                content = $("<div id='poptip_content'>" + msg + "</div>").appendTo(document.body);
            }
            else {
                content.html(msg);
                content.show();
                div.show();
            }
            if (autoClose) {
                setTimeout(function () {
                    content.fadeOut(500);
                    div.fadeOut(500);

                }, 1000);
            }
        }

        function tip_close() {
            $("#poptip").fadeOut(500);
            $("#poptip_content").fadeOut(500);
        }

        //
        //买家申请退款
        function applyRefund(id) {
            layer.open({
                content: '您确定申请退款吗？'
                , btn: ['是', '否']
                , yes: function (index) {
                    $.ajax({
                        url: "/b/order/applyRefund",
                        data: {"id": id},
                        dataType: "json",
                        success: function (data) {
                            if (data.status == "success") {
                                layer.msg(data.message);
                                window.location.href = "/b/order/orderListForm?type=thh";
                            } else {
                                layer.msg(data.message);

                            }
                        }
                    });
                }
            });
        }

        //买家确认收货
        function sureReceipt(id) {
            layer.open({
                content: '请您确认已经收到货？'
                , btn: ['是', '否']
                , yes: function (index) {
                    $.ajax({
                        url: "/b/order/sureReceipt",
                        data: {"id": id, "shopId": "${shopId!}"},
                        dataType: "json",type=dpj
                        success: function (data) {
                            if (data.status == "success") {
                                layer.msg(data.message);
                                window.location.href = "/b/order/orderListForm?";
                            } else {
                                layer.msg(data.message);
                            }
                        }
                    });
                }
            });
        }

        //买家申请退货
        function applyReshiped(id) {
            layer.open({
                content: '您确定申请退货吗？'
                , btn: ['是', '否']
                , yes: function (index) {
                    $.ajax({
                        url: "/b/order/applyReshiped",
                        data: {"id": id, "shopId": "${shopId!}"},
                        dataType: "json",
                        success: function (data) {
                            if (data.status == "success") {
                                layer.msg(data.message);
                                window.location.href = "/b/order/orderListForm?shopId=${shopId!}&type=";
                            } else {
                                layer.msg(data.message);
                            }
                        }
                    });
                }
            });
        }

        //跳转到会员中心
        function gotoMemberCenter() {
            window.location.href = "/b/customerCenter?shopId=${shopId!}";
        }


    </script>
</head>
<body style="background: rgb(235, 236, 237);">

<header>
    <div class="tab_nav">
        <div class="header">
            <div class="h-left"><a class="sb-back" href="javascript:history.back(-1)" title="返回"><img
                    src="/template/default/images/arrow_left_white.png"/></a></div>
            <div class="h-mid">订单详情</div>
        </div>
    </div>
</header>

<script type="text/javascript" src="/template/default/js/mobile.js"></script>
<div id="wrapper" class="order-buy">
    <div id="viewport">
        <div class="detail_top">
            <div class="lan">
                <dl>
                    <dt class="dingdan_1"></dt>
                    <dd>
                        <span class="dingdanhao">订单编号&nbsp;:&nbsp;${order.orderSn}</span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
                        <span>状态:&nbsp;&nbsp;&nbsp;&nbsp;
							<%if (order.orderStatusValue != "processed" && order.orderStatusValue != "unprocessed" && order.shippingStatusValue!="inReshiped" && order.shippingStatusValue!="reshiped" && order.shippingStatusValue!="partReshiped"){%>
							<span class="">[${i18n("OrderStatus." + order.orderStatusValue)}]</span><!--已完成,已作废-->
							<%}else if(order.paymentStatusValue=="unpaid" && order.shippingStatusValue=="unshipped"){%>
                            <!--未支付-->
								<span class="">[${i18n("PaymentStatus." + order.paymentStatusValue)}]</span>
							<%}else if( order.paymentStatusValue=="paid" && order.shippingStatusValue=="unshipped"){%>
                            <!--未发货-->
								<span class="">[${i18n("ShippingStatus." + order.shippingStatusValue)}]</span>
							<%}else if(order.paymentStatusValue=="paid" && order.shippingStatusValue=="shipped" && order.orderStatusValue !="completed"){%>
                            <!--待收货-->
								<span class="">[待收货]</span>
							<%}else if(order.paymentStatusValue=="inRefund"){%>
								<span class="">[${i18n("PaymentStatus." + order.paymentStatusValue)}]</span><!--退款中-->
							<%}else if(order.paymentStatusValue=="partRefund" || order.paymentStatusValue=="refunded"){%>
								<span class="">[${i18n("PaymentStatus." + order.paymentStatusValue)}]</span>
                            <!--部分退款,全额已退款-->
							<%}else if(order.shippingStatusValue=="inReshiped"){%>
								<span class="">[${i18n("ShippingStatus." + order.shippingStatusValue)}]</span><!--退货中-->
							<%}else if(order.shippingStatusValue=="partReshiped" || order.shippingStatusValue=="reshiped"){%>
								<span class="">[${i18n("ShippingStatus." + order.shippingStatusValue)}]</span>
                            <!--部分退货,已退货-->
							<%}%>
						</span><br>

                        <span></span>
                    </dd>
                </dl>
            </div>
        </div>

        <div class="ord_list1">
            <h2><img src="/template/default/images/dianpu.png">订单商品</h2>
            <%for(list in order.orderItemList){%>
            <div class="ord_dingdan">
                <div class="ord_img"><img src="${list.product.productImageList[0].sourceProductImagePath!}"></div>
                <div class="ord_name">
                    <p>
                        <a href="https://weixindl.68ecshop.com/mobile/goods.php?id=40" target="_blank">${list.productName}</a>
                    </p>
                    <span></span>
                    <strong> ￥${list.productPrice!}元&nbsp;x&nbsp;${list.productQuantity!}</strong>
                </div>
            </div>
            <div class="xiaoji">小计：<strong>￥${(list.productPrice)*(list.productQuantity)}元</strong></div>
            <%}%>
            <div class="jiage">
                <!--<p>商品总价	&nbsp;:&nbsp;<span class="price">￥139.00元</span></p>-->
                <p>共计&nbsp;:&nbsp;<strong><span style="font-size: 18px;color: red">￥${order.totalAmount!}元</span></strong>(含运费
                    ${order.deliveryFee})</p>
                <dl style="width:110px;float: right;margin-top: 5px;">
                    <form action="/b/order/confirm" method="post"><!--/b/order/confirm-->
                        <input hidden name="isMinNi" id="isMinNi" value=""/>
                        <%if (order.paymentConfig.paymentConfigTypeValue == "deposit"){%>
                        <input type="hidden" name="paymentType" value="deposit"/>
                        <%}else if (order.paymentConfig.paymentConfigTypeValue == "offline"){%>
                        <input type="hidden" name="paymentType" value="offline"/>
                        <%}else{%>
                        <input type="hidden" name="paymentType" value="online"/>
                        <%}%>
                        <input type="hidden" name="order.id" value="${order.id}" val/>
                        <input type="hidden" name="shopId" value="${shopId!}">
                        <%if (order.paymentStatusValue == "unpaid" && order.orderStatusValue!="invalid" &&
                        order.orderStatusValue!="completed"){%>
                        <input type="submit" class="btn btn-danger btn-sm" value="立即支付"
                               style="margin-right: 10px"/>
                        <%}else if(order.paymentStatusValue=="paid" && order.shippingStatusValue=="unshipped"){%>
                        <a onclick="applyRefund('${order.id}')" class="zhifu"
                           style=" color:#fff; font-size:15px;">申请退款</a><!-- 未发货状态时申请退款 -->
                        <%}else if(order.paymentStatusValue=="paid" && order.shippingStatusValue=="shipped" &&
                        order.orderStatusValue !="completed"){%>
                        <a onclick="sureReceipt('${order.id}')" class="zhifu"
                           style=" color:#fff; font-size:15px;">确认收货</a><!-- 已发货时确认收货-->
                        <%}else if(order.paymentStatusValue=="paid" && order.shippingStatusValue=="shipped" &&
                        order.orderStatusValue=="completed"){%>
                        <a onclick="applyReshiped('${order.id}')" class="zhifu" style=" color:#fff; font-size:15px;">申请退货</a>
                        <!-- 已发货时申请退货-->
                        <%}%>
                    </form>
                </dl>
            </div>

        </div>
        <section class="qita">
            <div class="subNav">|&nbsp;其他信息</div>
            <div class="navContent">
                <ul>
                    <li class="first">备注&nbsp;:&nbsp;${order.memo}</li>
                    <li>配送方式&nbsp;:&nbsp;${order.deliveryTypeName}</li>
                </ul>
            </div>
        </section>
        <section class="bottom-bar">
            <div class="total-price">
                <div>
                    <div class="submitOrder "><a class="c-order-btn  J_submit"
                                                 href="/b/customerCenter">返回个人中心</a></div>
                </div>
            </div>
        </section>

        <script type="text/javascript">
            $(function () {
                $(".subNav").click(function () {
                    $(this).toggleClass("currentDd").siblings(".subNav").removeClass("currentDd");
                    $(this).toggleClass("currentDt").siblings(".subNav").removeClass("currentDt");
                    $(this).next(".navContent").slideToggle(300).siblings(".navContent").slideUp(500);
                });
                var isMinNi = window.__wxjs_environment === 'miniprogram';
                console.log('environment: ' + window.__wxjs_environment);
             $('#isMinNi').val(isMinNi);
            })
        </script>

    </div>
</div>
</body>
</html>